/*
 * This file is part of LazyCipher. LazyCipher is free software: you can
 * redistribute it and/or modify it under the terms of the GNU General Public
 * License as published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version. LazyCipher is distributed in
 * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
 * the GNU General Public License for more details. You should have received a
 * copy of the GNU General Public License along with LazyCipher. If not, see
 * <http://www.gnu.org/licenses/>.
 */
package org.lazycoder.Crypto.Keys;

import org.lazycoder.Crypto.Letter;

/**
 * <p>
 * The Key object will hold a value to be used in the encryption process. The
 * cipher can get the key by calling the get* methods. These methods will create
 * content based on the input in the constructor which could be numeric, text or
 * any other valid key type. The created content will always be the same for a
 * given input for example inputting the number 2 and attempting to get it back
 * as a letter will always produce the letter b.
 * </p>
 * <p>
 * This will be implemented with a Factory Pattern. The key will be defined as a
 * type by the user and dynamically used by each of this classes childs. For
 * example, Objects can be instantiated by calling new TextKey this will create
 * a key with text inside. However if the Cipher class calls Key.getNumeric the
 * output will be the numeric representation of that letter.
 * </p>
 * 
 * @author Matthew Bayliss
 */
public interface Key {
	/**
	 * @return an Integer representation of the Key
	 */
	public Integer getInteger();

	/**
	 * @return a String representation of the Key
	 */
	public String getString();

	/**
	 * @return a Letter representation of the Key
	 * @see org.lazycoder.Crypto.Letter
	 */
	public Letter getLetter();

	/**
	 * Some keys will have multiple values. For example when using the Vignere
	 * cipher the key is expected to be a passage of text each letter of the
	 * plain text is encoded using the n<sup>th</sup> letter of the key this
	 * method allows this by automatically moving the pointer to the next
	 * letter. If there is only one item to the key (as expected by the Caesar
	 * cipher) this should do nothing.
	 */
	public void next();
}
